<template>
  <a-descriptions title="本周建议" bordered :column="{ xxl: 2, xl: 2, lg: 2, md: 2, sm: 2, xs: 1 }">
    <a-descriptions-item label="饮食建议" :span="2">
      {{ report.dietSuggest }}
    </a-descriptions-item>
    <a-descriptions-item label="运动建议" :span="2">
      {{ report.sportSuggest }}
    </a-descriptions-item>
    <a-descriptions-item label="用药建议" :span="2">
      {{ report.drugSuggest }}
    </a-descriptions-item>
    <a-descriptions-item label="胰岛素建议" :span="2">
      {{ report.insulinSuggest }}
    </a-descriptions-item>
    <a-descriptions-item label="总结" :span="2">
      <a-textarea
        placeholder="请输入服务建议，200字内"
        @change="
          e => {
            $emit('editSummary', e.target.value)
          }
        "
        v-model="reportSummary"
        :max-length="200"
        :auto-size="{ minRows: 5, maxRows: 7 }"
        allow-clear
      />
    </a-descriptions-item>
  </a-descriptions>
</template>

<script>
export default {
  name: 'Suggests',
  props: ['report', 'summary'],
  data() {
    return {}
  },
  computed: {
    reportSummary: {
      get: function() {
        return this.summary
      },
      set: function(v) {
        return v
      }
    }
  },
  methods: {}
}
</script>

<style lang="less" scoped>
/deep/ .ant-descriptions-item-label {
  width: 25% !important;
}
/deep/ .ant-descriptions-item-content {
  width: 75% !important;
}
</style>

